package c.d.a.a.d;

import com.github.mikephil.charting.charts.PieChart;
import com.github.mikephil.charting.data.PieEntry;
import java.text.DecimalFormat;

/* compiled from: PercentFormatter */
public class d extends e {
    public DecimalFormat a = new DecimalFormat("###,###,##0.0");
    public PieChart b;

    public d(PieChart pieChart) {
        this.b = pieChart;
    }

    public String a(float f) {
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append(this.a.format((double) f));
        stringBuilder.append(" %");
        return stringBuilder.toString();
    }

    public String b(float f, PieEntry pieEntry) {
        PieChart pieChart = this.b;
        if (pieChart == null || !pieChart.Q) {
            return this.a.format((double) f);
        }
        return a(f);
    }
}
